E Commerce

About The Application

RESTful API for e-commerce, engineered utilizing the Spring Boot framework and the Java programming language. This API adheres to the principles of RESTful architecture and is designed with scalability and maintainability at the forefront, allowing for effortless integration with third-party applications.

A salient feature of this API is its support for image management, which encompasses uploading and serving for customer, product, review, and feedback entities, as well as the ability to delete images from the database using HTTP methods, enabling optimal space management on both the server and client side.

This API boasts a highly modular and adaptable architecture, utilizing a sophisticated model mapping mechanism for seamless integration between entities and Data Transfer Objects (DTOs). This allows for a streamlined development process and a consistent, user-friendly experience through the implementation of custom DTOs for HTTP requests and responses, as well as JSON API responses for all requests.

Security is a top priority for this API, incorporating Spring Security and JSON Web Tokens (JWT) to ensure secure user authentication and role-based access control for each HTTP request, guaranteeing that only authorized users can access sensitive data. Moreover, the API employs Hibernate Validator, a powerful validation framework, to enforce data integrity and constraints across all HTTP requests and request bodies, thereby ensuring the validity and consistency of data throughout the application, and providing custom validation exceptions.

To enhance the user experience, the API incorporates Spring Hypermedia as the Engine of Application State (HATEOAS) library to provide hypermedia links, which aids in user flow and ease of access. Users can also take advantage of the API's pagination, filtering, sorting, and searching functionality, with self, collections, and paging hypermedia links, for improved efficiency. A system-generated admin interface is also provided for ease of use.

With its focus on performance, security, and user-friendliness, this API represents a cutting-edge solution for integrating e-commerce functionality into any application. Whether you are a developer seeking to add e-commerce capabilities to your existing application or a business looking for a powerful and customizable e-commerce platform, this API is the optimal choice.

What are the A.P.I features ?

  • RESTful API Design : Adheres to REST architectural principles, providing a set of CRUD endpoints accessible via standard HTTP methods (GET, POST, PUT, DELETE).
  • Modular Architecture : Designed with well-defined modules, facilitating clear separation of concerns for easier maintenance and scalability.
  • Human-Readable URIs : Uses user-friendly URIs for improved usability.
  • Image Handling : Supports image upload and retrieval for customers, products, reviews, and feedback.
  • Data Mapping : Employs object mapping to enable data exchange between client and server through mapping entities to transfer objects.
  • Hypermedia Navigation : Integrates Spring HateOAS for facilitating user navigation through the provision of hypermedia links.
  • Data Retrieval : Includes functionality for pagination, filtering, sorting, and searching for products, reviews, and feedback.
  • Efficient Data Transfer : Uses optimized transfer objects to enhance performance in both HTTP requests and responses.
  • JSON API Responses : Returns all requests in a JSON format, ensuring consistent data representation.
  • Customized Exception Handling : Implements customized exception handling for improved user experience and error messaging.
  • Request Body Validation : Implements request body data validation to ensure data accuracy and security.
  • Token-Based Auth and Authorization : Enables authentication and authorization through the use of JSON Web Tokens (JWT) with Spring Security.
  • Role-Based Access Control : Implements role-specific access control to restrict resource access to authorized users.
  • Security Measures : Incorporates security measures such as JWT token expiration after 20 minutes and restricted admin registration to maintain system security.
  • Database Administration : Provides administration tools for managing the database.
  • Product Categorization : Implements product categorization for improved browsing experience.
  • Product Filtering : Allows customers to view products based on the tag "Customer's Best Choice" and products on discount sale.
  • Order Management System : Offers a platform for customers to place, view, cancel orders, make payments, and track order status including delivery, pickup, return, and replacement.
  • Payment Method Management : Allows administrators to add, revoke, and manage available payment methods.
  • Sales and Revenue Reporting : Enables generation and viewing of sales and revenue reports including top-selling and least-selling products, highest sold products by rating and price, and sales made in different time periods.
  • What functionalities does the A.P.I provides ?


    ADMINISTRATOR FUNCTIONALITIES
  • Administrator Management
    • Endpoint for admin sign up
    • Endpoint for updating admin information
    • Endpoint for deleting admin accounts
    • Endpoint for retrieving admin information
  • Product Management
    • Endpoint for adding products
    • Endpoint for updating product information
    • Endpoint for deleting product information
    • Endpoint for updating product rating
    • Endpoint for updating product stock quantity
    • Endpoint for updating product image
    • Endpoint for changing product's category
    • Endpoint for adding products to discount sales
    • Endpoint for revoking product availability
    • Endpoint for adding products to customer's best choice product
  • Order Management
    • Endpoint for updating order status (processed, failed, to be dispatched, out for delivery, returned, replaced)
    • Endpoint for searching orders by user details
    • Endpoint for searching orders by order information
    • Endpoint for retrieving order information
    • Endpoint for approving refund requests
    • Endpoint for approving replacement requests
    • Endpoint for retrieving cancelled/refunded orders
  • Payment Management
    • Endpoint for adding payment methods
    • Endpoint for updating payment methods
    • Endpoint for deleting payment methods
    • Endpoint for revoking payment methods
  • Customer Management
    • Endpoint for retrieving customer information
    • Endpoint for searching customers by:
      • First name
      • Last name
      • First & last name
      • Email ID
  • Feedback & Reviews
    • Endpoint for retrieving feedback & reviews
    • Endpoint for sorting feedback & reviews by:
      • Rating
      • Date
      • Customer
      • Order
  • Dashboards
    • Endpoint for retrieving sales information:
      • Today's sales
      • Last week's sales
      • Last month's sales
      • Sales from Jan to Dec
    • Endpoint for retrieving product information:
      • Highest sold product by rating in a given duration
      • Highest rated product in a given duration
      • Highest sold product categorized by sale price
      • Highest sold product in different categories

  • CUSTOMER FUNCTIONALITIES
  • Customer Management
    • Endpoint for sign up
    • Endpoint for updating customer information
    • Endpoint for deleting customer accounts
    • Endpoint for retrieving customer information
    • Endpoint for updating customer profile pictures
    • Endpoint for deleting customer profile pictures
  • Address Management
    • Endpoint for adding addresses
    • Endpoint for retrieving customer addresses
    • Endpoint for updating customer addresses
  • Cart Management
    • Endpoint for adding products to cart
    • Endpoint for updating product quantity in cart
    • Endpoint for emptying the cart
    • Endpoint for deleting products from cart
    • Endpoint for retrieving cart details
    • Endpoint for processing a cart purchase
  • Category Management
    • Endpoint for retrieving categories
    • Endpoint for retrieving products by category
    • Endpoint for sorting products by category information
    • Endpoint for searching categories
  • Feedback & Reviews Management
    • Endpoint for adding feedback (with image attachment option)
    • Endpoint for adding and deleting product reviews and ratings
    • Endpoint for sorting reviews by:
      • Added date
      • Rating
  • Payment Management
    • Endpoint for retrieving available payment methods
  • Product Management
    • Endpoint for retrieving product details
    • Endpoints for sorting products by:
      • Rating
      • Sale price
      • Sale availability
      • Popularity among customers
      • Manufacturing month/year
      • Addition date
      • Addition date by category
      • Rating within a category
    • Endpoints for searching products by:
      • Name
      • Type
  • Order Management
    • Endpoint for placing orders
    • Endpoint for retrieving order history
    • Endpoint for cancelling orders
    • Endpoint for requesting refunds/replacements
    • Endpoint for tracking order/refund/replacement status